# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=acme.sh
pkgver=2.8.6
pkgrel=1
pkgdesc="An ACME Shell script, an acme client alternative to certbot"
options="!check" # No testsuite
url="https://github.com/Neilpang/acme.sh"
arch="noarch"
license="GPL-3.0-only"
depends="curl cmd:openssl"
source="$pkgname-$pkgver.tar.gz::https://github.com/Neilpang/acme.sh/archive/$pkgver.tar.gz"

package() {
	install -dm755 "$pkgdir"/usr/share/acme.sh/deploy
	install -dm755 "$pkgdir"/usr/share/acme.sh/dnsapi
	install -dm755 "$pkgdir"/usr/share/acme.sh/notify
	install -dm755 "$pkgdir"/usr/bin

	install -m755 acme.sh "$pkgdir"/usr/share/acme.sh/
	install -m755 deploy/*.sh "$pkgdir"/usr/share/acme.sh/deploy/
	install -m755 dnsapi/*.sh "$pkgdir"/usr/share/acme.sh/dnsapi/
	install -m755 dnsapi/*.sh "$pkgdir"/usr/share/acme.sh/notify/

	ln -s /usr/share/acme.sh/acme.sh "$pkgdir"/usr/bin/acme.sh
}

sha512sums="72d7dc4c66cc0261a14ed80d664b80a157db8be69e56632d7536bf8b7a8d3d56a47f56a7ebb1e2e894c2173a8338334e65a69827afcd03b8e40cdf57006c40f5  acme.sh-2.8.6.tar.gz"
